home *** CD-ROM | disk | FTP | other *** search
/ Webster's Millennium Amer…Sign Language Dictionary / ASL.ISO / mac / SHARED.cst / 00025_Script_list scroll < prev    next >
Text File  |  2001-09-17  |  955b  |  39 lines

  1. --∂ï
  2. on scrollSetUp
  3.   global sList
  4.   global listTop,listBottom,sListing
  5.   set ListTop = 1 
  6.   set ListBottom = 9
  7.   set sListing = ""
  8.   repeat with i = ListTop to ListBottom
  9.     set sListing = sListing&getAt(sList,i)&return
  10.   end repeat
  11.   set the text of cast "list" to sListing
  12. end scrollSetUp
  13.  
  14. on listScroll scDir
  15.   global sList
  16.   global listTop,listBottom,sListing
  17.   set ListTop = ListTop+scDir
  18.   set ListBottom = ListTop+8
  19.   if ListTop < 1 then 
  20.     set ListTop = 1 
  21.     set ListBottom = ListTop+8
  22.     exit
  23.   end if
  24.   if listBottom > count(sList) then
  25.     set ListBottom = count(sList)
  26.     set ListTop = ListBottom-8 
  27.     exit
  28.   end if
  29.   
  30.   if scDir = 1 then 
  31.     put line 2 to 9 of sListing&return&getAt(sList,listBottom) into sListing
  32.   else 
  33.     if scDir = -1 then 
  34.       put getAt(sList,listTop)&return&line 1 to 8 of sListing into sListing
  35.     end if
  36.   end if
  37.   
  38.   set the text of cast "list" to sListing
  39. end